Class symantec.itools.multimedia.SoundPlayer
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.multimedia.SoundPlayer

Object
   |
   +----symantec.itools.multimedia.SoundPlayer

public class SoundPlayer
extends Object
implements Serializable
SoundPlayer component. This component allows the playing of a list of sound clips either serially or simultaneously. The sound information is 8-bit 8000hz u-law encoded data.

Version:
1.1, July 25, 1997
Author:
Symantec

Variable Index

 o INFINITE
A constant specifying that the sound should run forever.

Constructor Index

 o symantec.itools.multimedia.SoundPlayer()
Constructs a SoundPlayer.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addStringURL(String)
Appends the sound clip data at the specified URL to the current list of sound clips.
 o addURL(URL)
Appends the sound clip data at the specified URL to the current list of sound clips.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o getRepeat()
Gets the number of times the list of sound clips is played.
 o getSyncMode()
 o getURLList()
Gets the URL of each sound clip.
 o isSyncMode()
Returns the number of times the list of sound clips is played.
 o play()
Starts playing the sound clips.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o setRepeat(int)
Sets the number of times the list of sound clips is played.
 o setSyncMode(boolean)
Sets whether to play the sound clips one after the other, or all simultaneously.
 o setURLList(URL[])
Initializes the list of sound clips using the given list of sound clip data URLs.
 o stop()
Immediately stops the playing of sound clips.
 o stop(int)
Stops the playing of sound clips after the specified number of milliseconds.

Variables

 o INFINITE
public static final int INFINITE
A constant specifying that the sound should run forever. Use with setRepeat().

See Also:
setRepeat

Constructors

 o SoundPlayer
public SoundPlayer()
Constructs a SoundPlayer. By default the sound clips will play serially (sync mode true), and will play only once (repeat count == 1).

Methods

 o addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to add.
See Also:
removePropertyChangeListener
 o addStringURL
public void addStringURL(String url)
Appends the sound clip data at the specified URL to the current list of sound clips. The specified file contains u-law encoded 8-bit 8000hz data.

Parameters:
url - the URL of a file containing sound clip data
 o addURL
public void addURL(URL u)
Appends the sound clip data at the specified URL to the current list of sound clips. The specified file contains u-law encoded 8-bit 8000hz data.

Parameters:
u - the URL of a file containing sound clip data
 o addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to add.
See Also:
removeVetoableChangeListener
 o getRepeat
public int getRepeat()
Gets the number of times the list of sound clips is played.

See Also:
setRepeat(int)
 o getSyncMode
public boolean getSyncMode()
Note: getSyncMode() is deprecated.

See Also:
isSyncMode
 o getURLList
public java.net.URL[] getURLList()
Gets the URL of each sound clip.

See Also:
setURLList
 o isSyncMode
public boolean isSyncMode()
Returns the number of times the list of sound clips is played.

 o play
public void play()
Starts playing the sound clips.

 o removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to remove.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to remove.
See Also:
addVetoableChangeListener
 o setRepeat
public void setRepeat(int c) throws PropertyVetoException
Sets the number of times the list of sound clips is played.

Parameters:
c - the number of times to play the list of sound clips, or INFINITE to keep playing forever
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getRepeat
 o setSyncMode
public void setSyncMode(boolean newSyncMode) throws PropertyVetoException
Sets whether to play the sound clips one after the other, or all simultaneously.

Parameters:
newSyncMode - true to play the sound clips serially, false to play them all simultaneously
Throws: PropertyVetoException
if the specified property value is unacceptable
 o setURLList
public void setURLList(URL[] list) throws PropertyVetoException
Initializes the list of sound clips using the given list of sound clip data URLs. Any previously existing sound clip information is lost. The files specified by the URLs contain u-law encoded 8-bit 8000hz data.

Parameters:
list - a list of URLs of files containing sound clip data
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getURLList
 o stop
public void stop()
Immediately stops the playing of sound clips.

 o stop
public void stop(int delay)
Stops the playing of sound clips after the specified number of milliseconds.

Parameters:
#delay - the number of milliseconds to wait before stopping sound play

All Packages  Class Hierarchy  This Package  Previous  Next  Index